<template>
<div>
  <el-card>
    <el-header>
      <el-col :span="3"><el-button type="primary" icon="el-icon-plus">添加</el-button></el-col>
    </el-header>

    <el-table :data="JurisdictionTree" show-checkbox row-key="id"
              :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
      <el-table-column type="selection"></el-table-column>
      <el-table-column label="描述"     prop="describes"></el-table-column>
      <el-table-column label="路径"     prop="url"></el-table-column>
      <el-table-column label="创建时间"  prop="createDate"></el-table-column>
      <el-table-column label="操作" width="350">
        <template #default="scope">
          <el-button type="text">修改</el-button>
          <el-button type="text">增加</el-button>
          <el-button type="text">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</div>
</template>

<script>
export default {
  name: "jurisdiction",
  data() {
    return {
      JurisdictionTree: [],//得到的权限资源树

    }
  },
  created() {
    this.getJurisdictionTree();
  },
  methods: {
    getJurisdictionTree() {
      this.$api.system.getJurisdictionTree().then(res => {
        console.log(res.data.data);
        this.JurisdictionTree = res.data.data
      }).catch()
    }
  }
}
</script>

<style scoped>

</style>